home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 June: Reference Library / Dev.CD Jun 94.toast / Periodicals / develop / develop Issue 10 / develop 10 code / Is it Art? / ArtMaker / AppInterface.h next >
Encoding:
C/C++ Source or Header  |  1992-04-08  |  2.0 KB  |  78 lines  |  [TEXT/KAHL]

  1. /* Menu IDs and item numbers */
  2. #define kAppleMenuID        128
  3.     #define    iAbout            1
  4.  
  5. #define kFileMenuID            129
  6.     #define    iOpen            1
  7.     #define    iClose            2
  8.     #define    iSave            3
  9.     #define    iSaveAs            4
  10.     #define    iPageSetup        6
  11.     #define    iPrint            7
  12.     #define    iQuit            9
  13.  
  14. #define kEditMenuID            130
  15.     #define    iUndo            1
  16.     #define    iCut            3
  17.     #define    iCopy            4
  18.     #define    iPaste            5
  19.     #define    iClear            6
  20.  
  21. /* Indexes into global menu array */
  22. #define kAppleMenu            0
  23. #define kFileMenu            1
  24. #define kEditMenu            2
  25.  
  26. /* The error alert id */
  27. #define kErrorAlertID        129
  28.  
  29. /*-----------------------------------------------
  30. Protoypes for routines that app must provide
  31. -----------------------------------------------*/
  32.  
  33. /* The start and the end */
  34. Boolean    AppInit(void);
  35. Boolean    AppQuit(void);
  36. void     AppCleanUp(void);
  37.  
  38. /* Events */
  39. void     AppActivate(WindowPtr wind, Boolean activate);
  40. void     AppUpdate(EventRecord *event);
  41. void     AppIdle(EventRecord *event);
  42. void     AppClick(Point thePt, WindowPtr whichWindptr, Boolean doubleClick);
  43. void     AppGrowWindow(WindowPtr wind, Point where, Rect *desk);
  44. void     AppZoomWindow(WindowPtr wind, short zoomDir);
  45.  
  46. /* Menus in general */
  47. void    AppAdjustMenus(void);
  48. void     AppMenu(short id, short item);
  49.  
  50. /* File Menu */
  51. void    AppNew(void);
  52. void    AppOpen(void);
  53. Boolean    AppClose(void);
  54. Boolean    AppSave(void);
  55. Boolean    AppSaveAs(void);
  56. void    AppPageSetup(void);
  57. void    AppPrint(void);
  58.  
  59. /* Edit Menu */
  60. void     AppUndo(void);
  61. void     AppCut(void);
  62. OSErr     AppCopy(void);
  63. void     AppPaste(void);
  64. void     AppClear(void);
  65.  
  66. /* --------------------------------------------------------
  67. Prototypes for shell routines the App may want to call
  68. -------------------------------------------------------- */
  69. int            abs(int i);
  70. long        labs(long i);
  71. Boolean     NewPixImage(PixMapHandle ThePix, Rect *TheRect, short dpth);
  72. Boolean     NewBitMap(BitMap *TheMap, Rect *TheRect);
  73. void         CenterRect(Rect *theRect, Point *thePt);
  74. Point         Center(Rect *theRect);
  75. short        NumToolboxTraps(void);
  76. TrapType    GetTrapType(short theTrap);
  77. Boolean        TrapAvailable(short theTrap);
  78.